package com.mccken.demo.io.netty.util;

/**
 * @program: mccken-collect
 * @description:
 * @author: mccken
 * @create: 2022-04-30 18:02
 **/
public interface MySerializer {

	/**
	 * 将对象序列化成字节数组
	 */
	<T> byte[] serialize(T obj);

	/**
	 * 将字节数组反序列化成对象
	 */
	<T> T deseralize(byte[] bytes, Class<T> clazz);
}
